let indexUrl = '/api/workorder/index';
let loginUrl = '/api/workorder/login';
let captchaPreUrl = '/api/workorder/captchaPre';
let sendSmsUrl = '/api/sms/send';
let registerUrl = '/api/user/register';
let categoryUrl = '/api/workorder/category';
let searchUrl = '/api/workorder/search';
let kbsUrl = '/api/workorder/kbs';
let kbsInfoUrl = '/api/workorder/kbsInfo';
let kbsOperateUrl = '/api/workorder/kbsOperate';
let createUrl = '/api/workorder/create';
let myUrl = '/api/workorder/my';
let detailUrl = '/api/workorder/detail';
let showConfidentialUrl = '/api/workorder/showConfidential';
let replyUrl = '/api/workorder/reply';
let evaluateUrl = '/api/workorder/evaluate';
let manageUrl = '/api/workorder/manage';
let transferUrl = '/api/workorder/transfer';
let searchTransferUrl = '/api/workorder/searchTransfer';
let userInfoUrl = '/api/workorder/userInfo';
let uploadMultipartUrl = '/api/workorder/uploadMultipart';

const install = (Vue, vm) => {
	let getIndex = (params = {}) => vm.$u.post(indexUrl, params);
	let login = (params = {}) => vm.$u.post(loginUrl, params);
	let captchaPre = (params = {}) => vm.$u.post(captchaPreUrl, params);
	let sendSms = (params = {}) => vm.$u.post(sendSmsUrl, params);
	let register = (params = {}) => vm.$u.post(registerUrl, params);
	let category = (params = {}) => vm.$u.post(categoryUrl, params);
	let search = (params = {}) => vm.$u.post(searchUrl, params);
	let kbs = (params = {}) => vm.$u.post(kbsUrl, params);
	let kbsInfo = (params = {}) => vm.$u.post(kbsInfoUrl, params);
	let kbsOperate = (params = {}) => vm.$u.post(kbsOperateUrl, params);
	let createGet = (params = {}) => vm.$u.get(createUrl, params);
	let createPost = (params = {}) => vm.$u.post(createUrl, params);
	let my = (params = {}) => vm.$u.get(myUrl, params);
	let delOrder = (params = {}) => vm.$u.delete(myUrl, params);
	let detail = (params = {}) => vm.$u.get(detailUrl, params);
	let detailPost = (params = {}) => vm.$u.post(detailUrl, params);
	let showConfidential = (params = {}) => vm.$u.get(showConfidentialUrl, params);
	let reply = (params = {}) => vm.$u.post(replyUrl, params);
	let evaluate = (params = {}) => vm.$u.post(evaluateUrl, params);
	let manage = (params = {}) => vm.$u.get(manageUrl, params);
	let transfer = (params = {}) => vm.$u.get(transferUrl, params);
	let transferPost = (params = {}) => vm.$u.post(transferUrl, params);
	let searchTransfer = (params = {}) => vm.$u.post(searchTransferUrl, params);
	let userInfo = (params = {}) => vm.$u.post(userInfoUrl, params);
	let uploadMultipart = (params = {}) => vm.$u.post(uploadMultipartUrl, params);
	vm.$u.api = {
		getIndex,
		login,
		captchaPre,
		sendSms,
		register,
		category,
		search,
		kbs,
		kbsInfo,
		kbsOperate,
		createGet,
		createPost,
		my,
		delOrder,
		detail,
		detailPost,
		reply,
		showConfidential,
		evaluate,
		manage,
		transfer,
		transferPost,
		searchTransfer,
		userInfo,
		uploadMultipart
	};
}

export default {
	install
}